package com.rules.admin.controller;

import com.rules.admin.entity.SysRole;
import com.rules.admin.service.SysRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping({"/role"})
public class SysRoleController {
   @Autowired
   private SysRoleService sysRoleService;

   @RequestMapping(
      method = {RequestMethod.GET}
   )
   @ResponseBody
   public List<SysRole> getGroup(long userId, long groupId) {
      return this.sysRoleService.get(userId, groupId);
   }
}
